<!DOCTYPE html>
<html lang="en">
  
  <head>
    <meta charset="UTF-8" />
    <title>统采商城-百货一站式采购服务平台</title>
   <title>{{.info.name}}</title>
    <meta charset="utf-8" name="keywords" content="{{.system.keywords}}" />
    <meta charset="utf-8" name="description" content="{{.system.description}}" />
    <link rel ="shortcut Icon" href="{{.system.pathname}}">
    <link rel="stylesheet" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/swiper/css/swiper.min.css">
    <link rel="stylesheet" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/css/index.min.css" />
    <link rel="stylesheet" type="text/css" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/font/iconfont.css">
    <link rel="stylesheet" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/css/xcConfirm.css">
    <link rel="stylesheet" href="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/css/toast.css" />
    <style type="text/css">
      .brand ul li:last-child {
        position: relative;
      }
      .brand ul li:last-child span {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        line-height: 100px;
        text-align: center;
        margin: auto;
        background-color: #fefefe;
        color: #666;
        font-size: 18px;
      }
      .brand ul li:last-child span i {
        position: relative;
        top: -0.1em;
        margin-left: 3px;
        color: #999;
        font-size: 14px;
      }
      .indexSale dl dt {
        position: relative;
        overflow: hidden;
      }
      .indexSale dl dt img {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        margin: auto;
      }
      p{height: 30px;}
      .main-nav .inner-con1 .inner-con2 {margin-left: 240px;}
      .news {position: absolute;right: calc((100vw - 1284px) / 2);box-shadow: 0 0 5px #ddd;width: 190px;background-color: rgba(255,255,255,.8);top: 36px;height: 360px;overflow: hidden;}
      .news .banner {width: 100%;height: 230px;background-repeat: no-repeat;background-size: 100% auto;background-position: center;border-bottom: 1px solid #f8f8f8;margin-bottom: 3px;}
      .news a {display: block;line-height: 18px;padding: 3px 13px;font-weight: bold;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
      .news .items {width: calc(100% + 20px);height: 110px;overflow-y: scroll;}
      .category-con {height: 360px;}
      .mt_carousel {height: 100%;background: #fff;}
      .mt_carousel .carousel_pic div {background-size: auto;background-position: center 0;width: 850px}
      .mt_carousel .carousel_pic {width: 850px;margin: 0 auto;height: 100%;overflow: hidden;left: 24px;position: relative}
      .mt_carousel .carousel_block {bottom: 20px;}
      .category-con .category-type {width: 240px;position: relative;right: 13px;}
      .category-con .nav-con .normal-nav {width: 240px;font-size: 0;height: 360px;position: relative;right: 13px;}
      .category-con .nav-con .normal-nav .sep {position: absolute;left: 50%;top: 0px;height: 85%;width: 3px;background-color: #f8f8f8;border: 1px solid rgba(0,0,0,.55);border-top-width: 8px;}
      .category-con .nav-con .normal-nav .nav-item {width: 50%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;}
      .category-con .nav-con .normal-nav .nav-item .icon {vertical-align: middle;}
      .category-con .nav-con .normal-nav .nav-item a {vertical-align: middle;}
      .category-con .nav-con .normal-nav .nav-item .column_cont {left: 240px;z-index: 1;height: 100%;}
      .category-con .nav-con .normal-nav .nav-item:nth-child(2n) .column_cont {left: 120px;}
      .brand .banner {position: relative;width: 935px;background-color: #666;margin-left: 10px;overflow: hidden;}
      .brand .block {position: relative;width: 1000000px;height: 100%;overflow: hidden;}
      .brand .block a {float: left;display: block;width: 935px;height: 100%;background-repeat: no-repeat;background-size: cover;background-position: center;}
      .brand .nav {position: absolute;bottom: 15px;left: 50%;transform: translateX(-50%);margin: auto;line-height: 20px;}
      .brand .nav span {display: inline-block;margin: 0 5px;background-color: rgba(0,0,0,.5);width: 10px;height: 10px;border-radius: 10px;}
      .brand .nav span.on {background-color: #e31939;}
      .three-block {width: 1260px;margin: 15px auto 0;}
      .brand-street {float: left;background-color: #fff;width: 440px;}
      .three-block .head span {vertical-align: middle;}
      .three-block .head {padding: 5px 0 5px 18px;margin-bottom: 8px;font-size: 28px;color: #fff;font-weight: bold;line-height: 44px;background-repeat: no-repeat;background-size: auto 100%;}
      .novice-join .head {background-image: url("/static/img/b3.jpg");}
      .novice-join .head span:last-child {margin-left: 65px;font-size: 0.7em;color: #111;}
      .pro-struct-wrap .head {background-image: url("/static/img/b2.jpg");background-size: 100% 100%;}
      .pro-struct-wrap .head span:last-child {margin-left: 90px;font-size: 0.7em;color: #111;}
      .brand-street .head {background-image: url("/static/img/b1.jpg");background-size: 100% 100%;}
      .brand-street .head span:last-child {margin-left: 100px;font-size: 0.7em;color: #111;} 
      .brand-street .nav {width: 100%;height: 26px;line-height: 26px;color: #666;background-color: #f8f8f8;font-size: 0;}
      .brand-street .nav span {overflow:hidden;text-overflow: ellipsis;display: inline-block;width: 25%;padding: 0 8px;text-align: center;cursor: pointer;font-size: 12px;box-sizing: border-box;white-space: nowrap;}
      .brand-street .nav span.on {color: #e31939;}
      .brand-street .content {width: 100%;overflow: hidden;}
      .brand-street .ctn-cell {position: relative;left: 0;width: 1000000px;}
      .brand-street .img-wrap {position: relative;display: inline-block;overflow: hidden;width: 110px;height: 110px;}
      .brand-street .img-wrap:hover .cover {opacity: 1;}
      .brand-street .cover {position: absolute;top: 0;left: 0;transition: opacity .3s;width: 100%;height: 100%;opacity: 0;background-color: rgba(0,0,0,0.6);font-size: 12px;line-height: 20px;color: #fff;padding-top: 30px;box-sizing: border-box;}
      .brand-street .cover span {display: block;text-align: center;}
      .brand-street .cover span:first-child {overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
      .brand-street .cover span:last-child {width: 80%;height: 20px;line-height: 16px;background-color: #E31939;border-radius: 20px;margin: 5px auto;}
      .brand-street .img-wrap img {position: absolute;width: 80%;top: 0;bottom: 0;left: 0;right: 0;margin: auto;}
      .brand-street .ctn-wrapper {position: relative;width: 880px;left: 0;top: 0;}
      .brand-street .ctn-wrapper .ctn-cell {float: left;}
      .brand-street .brands {font-size: 0;width: 440px;height: 330px;float: left;}
      .three-block .footer {height: 40px;line-height: 40px;text-align: center;border-top: 1px solid #eee;box-sizing: border-box;}
      .three-block .footer span {display: inline-block;margin: 0 5px;width: 10px;height: 10px;border-radius: 10px;background-color: #ccc;}
      .three-block .footer span.on {background-color: #e31939;}
      .pro-struct-wrap {float: left;background-color: #fff;width: 480px;margin-left: 10px;}
      .pro-struct-wrap .content {margin: 0 20px;overflow: hidden;}
      .pro-struct-wrap .ctn-wrapper {position: relative;width: 100000px;}
      .pro-struct-wrap .ctn-cell {width: 440px;float: left;}
      .pro-struct-wrap .content .img-wrap {position: relative;height: 160px;overflow: hidden;border-radius: 3px;}
      .pro-struct-wrap .content .img-wrap img {position: absolute;width: 100%;}
      .pro-struct-wrap .column-img .pic {float: left;position: relative;width: 80px;height: 80px;overflow: hidden;margin-right: 10px;cursor: pointer;}
      .pro-struct-wrap .column-img .pic img {position: absolute;width: 100%;top: 0;bottom: 0;margin: auto;}
      .pro-struct-wrap .column-img .pic:hover {opacity: 0.7;}
      .pro-struct-wrap .column-img {margin: 10px 0;margin-right: -10px;height: 80px;}
      .pro-struct-wrap .info .title {text-align: center;color: #222;font-size: 18px;font-weight: 600;margin: 18px 0;height: 20px;line-height: 20px;}
      .pro-struct-wrap .info .intro {color: #666;font-size: 14px;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;word-break: break-all;word-wrap: break-word;line-height: 20px;margin: 0 0 10px;}
      .novice-join {float: left;margin-left: 10px;background-color: #fff;width: 320px;}
      .novice-join .nav {width: 100%;height: 24px;line-height: 24px;color: #666;font-size: 0;margin-top: 10px;}
      .novice-join .nav div {position: relative;overflow:hidden;text-overflow: ellipsis;display: inline-block;width: 20%;padding: 0 3px;text-align: center;cursor: pointer;font-size: 12px;box-sizing: border-box;white-space: nowrap;}
      /*.novice-join .nav div.on {font-weight: bold;color: #000;}
      .novice-join .nav div.on:after {content: '';display: block;background-color: #e31939;position: absolute;width: 80%;height: 2px;border-radius: 2px;bottom: 0px;left: 0;right: 0;margin: 0 auto;}*/
       .novice-join .nav span {display: inline-block;height: 16px;line-height: 16px;font-size: 12px;color: #333;}
      .novice-join .nav div.on span {position: relative;display: inline-block;background-color: #F26633;color: #fff;padding: 0;}
      .novice-join .nav div.on span:after {content: "";position: absolute;left: -16px;border: 8px solid #F26633;border-top-color: transparent;border-bottom-color: transparent;border-left-color: transparent;}
      .novice-join .nav div.on span:before {content: "";position: absolute;right: -16px;border: 8px solid #F26633;border-top-color: transparent;border-bottom-color: transparent;border-right-color: transparent;}
      .novice-join .content {height: 102px;overflow: hidden;font-size: 0;padding: 4px 10px;box-sizing: border-box;}
      .novice-join .content .ctn-cell {overflow-y: scroll;width: calc(100% + 28px);height: 100%;}
      .novice-join .content a {display: inline-block;width: 100%;padding: 0 8px 5px 0;box-sizing: border-box;}
      .novice-join .content .item {display: block;font-size: 14px;color: #fff;padding: 0 8px;line-height: 24px;box-sizing: border-box;cursor: pointer;text-overflow: ellipsis;white-space: nowrap;background-size: 100% 100%;background-repeat: no-repeat;}
      .three-block .t-red {transition: color .1s;}
      /*.three-block .t-red:hover {color: #e31939;}*/
      .three-block .banner {background-repeat: no-repeat;background-size: cover;background-position: center;margin: 0 8px;height: 260px;border-radius: 3px;}
      @media (max-width: 1260px) {
        .three-block {width: 990px;}
        .brand-street {width: 340px;}
        .brand-street .img-wrap {width: 85px;height: 85px;}
        .brand-street .brands {height: 255px;width: 340px;}
        .brand-street .cover {padding-top: 20px;}
        .pro-struct-wrap {width: 370px;}
        .pro-struct-wrap .ctn-cell {width: 330px;}
        .pro-struct-wrap .content .img-wrap {height: 120px;}
        .pro-struct-wrap .column-img .pic {width: 60px;margin-right: 6px;}
        .pro-struct-wrap .info .intro {margin: 0 0 4px;}
        .pro-struct-wrap .column-img {margin: 5px 0;}
        .pro-struct-wrap .info .title {margin: 6px 0;}
        .novice-join {width: 260px;}
        .three-block .banner {height: 200px;}
        .novice-join .content {height: 87px;}
        .brand .banner {width: 730px;}
        .brand .block a {width: 730px;}
        .brand>div img {width: 245px;}
        .brand>div {width: 245px;height: 312px;}
        .three-block .head {font-size: 24px;}
        .pro-struct-wrap .head span:last-child {margin-left: 60px;}
        .brand-street .head span:last-child {margin-left: 70px;}
      }
    </style>
  </head>
    
  <body class="index"> 
    <!--from fragment-->
    {{template "pc/public/head.html" .}}
    {{template "pc/public/search.html" .}}
    <div id="content" style="position: relative;">
      <div class="main-nav" data-spm="2016004">
        <div class="inner-con0">
          <div class="inner-con1">
            <div class="inner-con2 clearfix">
              <a href="#">
                <img alt="" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/pc/pc_top.png" />
                <div class="hover-pic"></div>
              </a>
              {{range .index.columnhot}}
              <a href="/search_all?cid={{.id}}">{{.name}}
                <div class="hover-pic"></div>
              </a>
              {{end}}
              <a href="http://www.tongcaigou.com/search_all?search=&bid=&cid=&page=&min=&max=&status=2">
                新品推荐
                <div class="hover-pic"></div>
              </a>
            </div>
          </div>
        </div>
      </div>
      <div class="j_category category-con">
        <div class="category-inner-con j_categoryInnerCon j_categoryTab">
          <div class="category-type">
            <i class="iconfont">&#xe6d0;</i>
            <div class="text">商品分类</div></div>
          <div class="category-tab-content">
            <div class="nav-con j_tabPannel category-tab-pannel pannel-normal">
              <ul class="normal-nav clearfix">
                <div class="sep"></div>
                {{range .column}}
                <li class="j_MenuNav nav-item nav-item-0 category-loaded" data-spm="category2016010">
                  <i class="fp-iconfont nav-item-icon iconfont icon">{{if .icon}}{{str2html .icon}}{{end}}</i>
                  <!-- <i class="dot fp-iconfont"></i> -->
                  <a href="#">{{.name}}</a>
                  <b class="arrow"></b>
                  <div class="column_cont">
                    <div class="columnText">
                      {{range .column2}}
                      <dl>
                        <dt><a href="/search_all?cid={{.id}}" class="{{if eq .hot "1"}}color{{end}}">{{.name}}</a></dt>
                          {{if .column3}}
                        <dd>
                          {{range .column3}}
                          <a href="/search_all?cid={{.id}}" class="{{if eq .hot "1"}}color{{end}}">{{.name}}</a>
                          {{end}}
                        </dd>
                          {{end}}
                      </dl>
                      {{end}}
                    </div>
                    <div class="columnBrand">
                      {{range .brand}}
                      <a href="/search_all?bid={{.id}}"><img src="{{.pathname}}" alt=""></a>
                      {{end}}
                    </div>
                  </div>
                </li>
                {{end}}
              </ul>
            </div>
          </div>
        </div>
        <div class="mt_carousel">
          <div class="carousel_pic">
            {{range .index.ad}}
             <div class="bgImg" data="{{.urls}}" style="background: url({{.pathname}}) ;background-position: center;background-repeat: no-repeat;background-size: 100% 100%;"></div>
            {{end}}
          </div>
          <div class="carousel_block">
            {{range .index.ad}}
            <span></span>
            {{end}}
          </div>
        </div>
      </div>

      <!-- <div class="combined">
        {{range $i, $v := .indexprogram.program}}
        {{ if $v }}
        <a href="/program?id={{.id}}">
          <dl>
            <dt style="background-image: url({{.pathname}});"></dt>
            <dd>{{.name}}</dd>
            <dd>{{.intr}}</dd>
          </dl>
        </a>
        {{ end }}
        {{end}}
      </div> -->

      <style type="text/css">
        .index .gbuy{top: 37px !important;height: 360px !important}
      </style>
      <div class="news" id="news">
        {{range $i,$v := $.news}}
        {{if eq $i 0}}
        <a href="/news?id={{.id}}">
          <div class="banner" style="background-image: url({{.pathname}});"></div>
        </a>
        {{end}}
        {{end}}
        <div class="items">
          {{range $.news}}
          <a href="/news?id={{.id}}" class="item" data-path="{{.pathname}}" title="{{.title}}">{{.title}}</a>
          {{end}}
        </div>
      </div>
      <!-- {{if .gbuy}} 
      <div class="gbuy">
           <h4>限时团购</h4>
        <div class="swiper-container swiper-container-horizontal" id="gbuy{{.id}}">
          <div class="swiper-wrapper" style="transition-duration: 0ms; transform: translate3d(-0px, 0px, 0px);">
            {{range .gbuy}}
            <div class="swiper-slide" style="width: 195px;">
              <a href="/product/content?id={{.pid}}">
                <dl>
                  <dt><img src="{{.product.pathname}}"></dt>
                  <dd>{{.title}}</dd>
                  <dd><span>&yen;{{.price}}</span></dd>
                  <dd><span class="days">12</span>天<span class="hours">11</span>时<span class="minutes">10</span>分<span class="secouds">09</span>秒</dd>
                </dl>
              </a>
             <div>
              {{range $.news}}
              <a href="/news?id={{.id}}"><div style="font: 14px;color: #333;font-weight: 600;padding: 5px;">{{.title}}</div></a>
              {{end}}
            </div>
            </div>
            {{end}}
          </div>
        <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
        <div class="swiper-button-next" tabindex="0" role="button" aria-label="Next slide" aria-disabled="false"></div>
        <div class="swiper-button-prev" tabindex="0" role="button" aria-label="Previous slide" aria-disabled="false"></div>
       
      </div>
    {{end}} -->
    </div>
<!--     {{ if .block1 }}
    <div class="promotion-wrap clearfix">
      <div class="promotion-head">
        <a href="{{ .block1.url }}">
          <img src="{{ .block1.info.pathname }}">
        </a>
      </div>
      <div class="promotion-cnt">
        {{ range .block1.product }}
        <div class="promotion-pro">
          <div class="pic-wrap">
            <a href="{{ .link }}">
              <img src="{{ .pathname }}">
            </a>
          </div>
          <div class="promotion-pro-intro">
            <div class="pro-title">{{ .title }}</div>
            <p class="pro-price">¥ <span>{{ .price }}</span>/个</p>
            <a href="{{ .link }}"><button class="pro-btn">去抢购</button></a>
          </div>
        </div>
        {{ end }}
      </div>
    </div>
    {{ end }}
    {{ if .block2 }} 
    <div class="wedding-wrap clearfix">
      <div class="wedding-left">
        <div class="wedding-main-pic">
          <a href="{{ .block2.url }}">
            <img src="{{ .block2.info.pathname }}">
          </a>
        </div>
      </div>
      <div class="wedding-right">
        <div>
          {{ range .block2.lastproduct }}
          <div class="wedding-pro">
            <a href="{{ .link }}">
              <div class="pic-wrap">
                <img src="{{ .pathname }}">
              </div>
              <div class="pro-title">{{ .title }}</div>
              <p class="pro-price">¥<span>{{ .price }}</span></p>
            </a>
          </div>
          {{ end }}
          <div class="wedding-pro wedding-mainp">
            <a href="{{ .block2.mainproduct.link }}">
              <div class="wedding-mainp-left">
                <div class="pic-wrap">
                  <img src="{{ .block2.mainproduct.pathname }}">
                </div>
              </div>
              <div class="wedding-mainp-right">
                <div class="pro-title">{{ .block2.mainproduct.title }}</div>
                <p class="pro-brand">品牌: {{ .block2.mainproduct.bname }}</p>
                <p class="pro-price">
                  ¥<span>{{ .block2.mainproduct.price }}</span>
                </p>
                <p class="pro-sellnum">销量 {{ .block2.mainproduct.sellnum }}</p>
              </div>
            </a>
          </div>
        </div>
      </div>
    </div>
    {{ end }}
    {{ if .block3 }}
    <div class="clearance-wrap clearfix">
      <div class="main-block">
        <div class="banner-pic pic-wrap">
          <a href="{{ .block3.url }}"><img src="{{ .block3.info.pathname }}"></a>
        </div>
        {{ range .block3.lastproduct }}
        <div class="l-b-pic pic-wrap">
          <a href="{{ .link }}"><img src="{{ .pathname }}"></a>
        </div>
        {{ end }}
      </div>
      <div class="center-block pic-wrap">
        <a href="{{ .block3.mainproduct.link }}">
          <img src="{{ .block3.mainproduct.pathname }}">
        </a>
        <div class="product-intr">
          <p class="pro-title">{{ .block3.mainproduct.title }}</p>
          <p class="pro-bname">品牌: {{ .block3.mainproduct.bname }}</p>
          <p class="pro-price">¥<span>{{ .block3.mainproduct.price }}</span></p>
          <p class="pro-sellnum">销量 {{ .block3.mainproduct.sellnum }}</p>
          <a href="{{ .block3.mainproduct.link }}" class="buy-btn">立即购买</a>
        </div>
      </div>
    </div>
    {{ end }} -->
    <!-- <div class="new-wrapper clearfix">
      <div class="new-banner"><img style="width: 100%" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/1510857133564318278.jpg"></div>  
      <div class="left-content">
        <div>
          <h4 class="pro-title">味老大整竹菜板实心加厚砧板1012</h4>
          <p class="pro-price">¥ <span>117.15</span></p>
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/201804/source_img/632_G_1523230398733.jpg">
        </div>
        <div>
          <h4 class="pro-title">味老大整竹菜板实心加厚砧板1012</h4>
          <p class="pro-price">¥ <span>117.15</span></p>
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/201804/source_img/632_G_1523230398733.jpg">
        </div>
      </div>
      <div class="center-content">
        <h4 class="pro-title">味老大整竹菜板实心加厚砧板1012</h4>
        <p class="pro-price">¥ <span>117.15</span></p>
        <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/201804/source_img/632_G_1523230398733.jpg">  
      </div>
      <div class="right-content">
        <div>
          <h4 class="pro-title">味老大整竹菜板实心加厚砧板1012</h4>
          <div class="img-wrap">
            <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/201804/source_img/632_G_1523230398733.jpg">
            <p class="pro-price">¥ <span>117.15</span></p> 
          </div>
        </div>  
        <div>
          <h4 class="pro-title">味老大整竹菜板实心加厚砧板1012</h4>
          <div class="img-wrap">
            <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/201804/source_img/632_G_1523230398733.jpg">
            <p class="pro-price">¥ <span>117.15</span></p> 
          </div>
        </div>
        <div>
          <h4 class="pro-title">味老大整竹菜板实心加厚砧板1012</h4>
          <div class="img-wrap">
            <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/201804/source_img/632_G_1523230398733.jpg">
            <p class="pro-price">¥ <span>117.15</span></p> 
          </div>
        </div>  
      </div>
    </div> -->
    <div class="three-block clearfix">
      {{if .indexshow.brandshow}}
      <div class="brand-street">
        <div class="head">
          <span>品牌街</span>
          <span class="arrow"></span>
          <span>甄选优质品牌</span>
        </div>
        <div>
          <div class="nav" id="brandStreetNav"></div>
          <div class="content brandStreetCtn"></div>
        </div>
      </div>
      {{end}}
      {{if .indexshow.proshow}}
      <div class="pro-struct-wrap">
        <div class="head">
          <span>商品结构</span>
          <span class="arrow"></span>
          <span>专属商品结构</span>
        </div>
        <div class="content">
          <div class="ctn-wrapper clearfix">
            {{range .productStruct}}
            <a href="/good?id={{.id}}">
            <div class="ctn-cell">
              <div class="img-wrap">
                <img src="{{.pathname}}">
              </div>
              <div class="column-img clearfix">
                {{range .pros}}
                <div class="pic" title="{{.title}}">
                  <a href="/product/content?id={{.id}}">
                    <img src="{{.pathname}}">
                  </a>
                </div>
                {{end}}
              </div>
              <div class="info">
                <div class="title">{{.name}}</div>
                <div class="intro" title="{{.introduce}}">{{.introduce}}</div>
              </div>
            </div>
            </a>
            {{end}}
          </div>
          <div class="footer"></div>
        </div>
      </div>
      {{end}}
      {{if .indexshow.noviceshow}}
      <div class="novice-join">
        <div class="head">
          <span>新手加入</span>
          <span class="arrow"></span>
          <span>新手帮助</span>
        </div>
        <div class="banner"></div>
        <div class="nav" id="noviceNav">
          {{range $i, $v := .noviceJoin}}
          <div {{if eq $i 0}}class="on"{{end}} title="{{.name}}">
            <span>{{.name}}</span>
          </div>
          {{end}}
        </div>
        <div class="content" id="noviceCtn">
          {{range $i, $v := .noviceJoin}}
          <div class="ctn-cell" {{if ne $i 0}}style="display: none;"{{end}}>
            {{range .ctn}}
            <a href="/novice?id={{.id}}"><div class="item t-red">{{.title}}</div></a>
            {{end}}
          </div>
          {{end}}
        </div>
      </div>
      {{end}}
    </div>
    <div class="brand">
      <div style="background: url(/static/images/20200307114534.jpg) no-repeat center;background-size: cover;">
        <!-- <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/images/1510857133564318278.jpg"> -->
      </div>
      <div class="banner">
        <div class="block clearfix" id="brandCtn">
          {{range .indexprogram.program}}
          <!-- <a href="/program?id={{.id}}" style="background-image: url(/static/uppic/function/2019-01-31/1548907448685830500.jpg);"></a> -->
          <a href="/program?id={{.id}}" style="background-image: url({{.pathname}});"></a>
          {{end}}
        </div>
        <div class="nav" id="brandNav">
          {{range $i, $v := .indexprogram.program}}
          <span {{if eq $i 0}}class="on"{{end}}></span>
          {{end}}
        </div>
      </div>
    </div>
    <div class="indexSale">
      <ul>
        <li data="salePrd" class="ac">发现好货</li>
        <li data="hotPrd">热卖精品</li>
        <li data="hotSalePrd">人气推荐</li>
        <li data="rcmdPrd">商城推荐</li>
        <li data="newPrd">新品上市</li>
      </ul>
      <style type="text/css">
        .indexSale div a{position: relative;}
        .indexSale div a .x{position: absolute;top: -5px;left: 10%;width: 50px;height: 50px;z-index: 10}
      </style>
      <div class="salePrd">
        {{range .good}}
        <a href="/product/content?id={{.id}}">
          <dl>
            <dt>
              <img src="{{.pathname}}" alt="">
            </dt>
            <dd>
              <p>{{.title}}</p>
              {{if .vprice}}
              <p>&yen;{{.vprice}}<s>&yen;{{.price}}</s></p>
              {{else}}
              <p>&yen;{{.price}}</p>
              {{end}}
            </dd>
            <i class="iconfont scadd" data-id="{{.id}}" data-minbuy='{{.minbuy}}'>&#xe619;</i>
          </dl>
          {{if eq .active 1}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/gbuy.png" class="x">
          {{else if eq .active 2}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/sales.png" class="x">
          {{end}}
        </a>
        {{end}}
      </div>
      <div class="hotPrd">
        {{range .mbuy}}
        <a href="/product/content?id={{.id}}">
          <dl>
            <dt>
              <img src="{{.pathname}}" alt="">
            </dt>
            <dd>
              <p>{{.title}}</p>
              {{if .vprice}}
              <p>&yen;{{.vprice}}<s>&yen;{{.price}}</s></p>
              {{else}}
              <p>&yen;{{.price}}</p>
              {{end}}
            </dd>
            <i class="iconfont scadd" data-id="{{.id}}" data-minbuy='{{.minbuy}}'>&#xe619;</i>
          </dl>
          {{if eq .active 1}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/gbuy.png" class="x">
          {{else if eq .active 2}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/sales.png" class="x">
          {{end}}
        </a>
        {{end}}
      </div>
      <div class="hotSalePrd">
        {{range .recom}}
        <a href="/product/content?id={{.id}}">
          <dl>
            <dt>
              <img src="{{.pathname}}" alt="">
            </dt>
            <dd>
              <p>{{.title}}</p>
              {{if .vprice}}
              <p>&yen;{{.vprice}}<s>&yen;{{.price}}</s></p>
              {{else}}
              <p>&yen;{{.price}}</p>
              {{end}}
            </dd>
            <i class="iconfont scadd" data-id="{{.id}}" data-minbuy='{{.minbuy}}'>&#xe619;</i>
          </dl>
          {{if eq .active 1}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/gbuy.png" class="x">
          {{else if eq .active 2}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/sales.png" class="x">
          {{end}}
        </a>
        {{end}}
      </div>
      <div class="rcmdPrd">
        {{range .recommend}}
        <a href="/product/content?id={{.id}}">
          <dl>
            <dt>
              <img src="{{.pathname}}" alt="">
            </dt>
            <dd>
              <p>{{.title}}</p>
              {{if .vprice}}
              <p>&yen;{{.vprice}}<s>&yen;{{.price}}</s></p>
              {{else}}
              <p>&yen;{{.price}}</p>
              {{end}}
            </dd>
            <i class="iconfont scadd" data-id="{{.id}}" data-minbuy='{{.minbuy}}'>&#xe619;</i>
          </dl>
          {{if eq .active 1}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/gbuy.png" class="x">
          {{else if eq .active 2}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/sales.png" class="x">
          {{end}}
        </a>
        {{end}}
      </div>
      <div class="newPrd">
        {{range .newproduct}}
        <a href="/product/content?id={{.id}}">
          {{if eq .active 1}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/gbuy.png" class="x">
          {{else if eq .active 2}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/sales.png" class="x">
          {{end}}
          <dl>
            <dt>
              <img src="{{.pathname}}" alt="">
            </dt>
            <dd>
              <p>{{.title}}</p>
              {{if .vprice}}
              <p>&yen;{{.vprice}}<s>&yen;{{.price}}</s></p>
              {{else}}
              <p>&yen;{{.price}}</p>
              {{end}}
            </dd>
            <i class="iconfont scadd" data-id="{{.id}}" data-minbuy='{{.minbuy}}'>&#xe619;</i>
          </dl>
        </a>
        {{end}}
      </div>
    </div>
    {{range .column}}
    {{if .product}}
    <style type="text/css">
      .prdBox dl{position: relative;}
      .prdBox dl .x{position: absolute;left: 0;top: -5px;width: 50px;height: 50px;}
    </style>
    <div class="prdBox">
      <div>
        <span>{{.name}}<span>{{.english}}</span></span>
        {{ if eq $.gid "0" }}
        <div>
          {{range .column2}}
          <a href="/search_all?cid={{.id}}">{{.name}}</a>
          {{end}}
        </div>
        {{ end }}
      </div>
      <div>
        <div style="background-image: url({{.pathname}});">
        </div>
        {{range .product}}
          <dl>
          <a href="/product/content?id={{.id}}">
            <dt>
              <img style="height: 215.45px" src="{{.pathname}}" alt="">
            </dt>
            <dd>
              <p>{{.title}}</p>
              {{if .vprice}}
              <p>&yen;{{.vprice}}<s>&yen;{{.price}}</s></p>
              {{else}}
              <p>&yen;{{.price}}</p>
              {{end}}
            </dd>
          </a>
          <i class="iconfont scadd" data-id="{{.id}}" data-minbuy='{{.minbuy}}'>&#xe619;</i>
          {{if eq .active 1}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/gbuy.png" class="x">
          {{else if eq .active 2}}
          <img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/img/sales.png" class="x">
          {{end}}
          </dl>
        {{end}}
      </div>
    </div>
    {{end}}
    {{end}}
    {{template "pc/public/foot.html" .}}
  </body>
  <script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/js/jquery.min.js"></script>
  <script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
  <script type="text/javascript" src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/pc/js/toast.js"></script>
  <script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/wechat/frame/swiper/js/swiper.min.js?"></script>
  <script type="text/javascript">
    var swiper = new Swiper('.swiper-container', {
      navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
      }
    });
    // var gbuy = document.querySelectorAll(".swiper-slide")
    // for (var i = 0; i < gbuy.length; i++) {
    //   (function(i){
    //     setInterval(function(){
    //       if (gbuy[i].querySelector(".secouds").innerText > 0) {
    //         gbuy[i].querySelector(".secouds").innerText--
    //       }else if (gbuy[i].querySelector(".secouds").innerText == 0 && gbuy[i].querySelector(".minutes").innerText > 0) {
    //         gbuy[i].querySelector(".minutes").innerText--
    //         gbuy[i].querySelector(".secouds").innerText = 59
    //       }else if (gbuy[i].querySelector(".minutes").innerText == 0 && gbuy[i].querySelector(".hours").innerText > 0) {
    //         gbuy[i].querySelector(".hours").innerText--
    //         gbuy[i].querySelector(".minutes").innerText = 59
    //         gbuy[i].querySelector(".secouds").innerText = 59
    //       }
    //     },1000)
    //   })(i)
    // } ;
    var gbuy={{.gbuy}};
    var gbuydom=$('.swiper-slide');
    function cuttime(){ 
      if(gbuydom){
        gbuydom.each(function(index){
          var dur=gbuy[index].dur
          var d=Math.floor(dur/(24*60*60))
          var h=Math.floor((dur-d*86400)/1440)
          var m=Math.floor((dur-d*86400-h*1440)/60)
          var s=dur-d*86400-h*1440-60*m
          $(this).find('.days').html(d)
          $(this).find('.hours').html(h)
          $(this).find('.minutes').html(m)
          $(this).find('.secouds').html(s)
          gbuy[index].dur=dur-1
        })
      }
    }
    cuttime()
    setInterval(cuttime, 1000)
    $('.scadd').click(function(){
      var pid=$(this).attr('data-id')
      var minbuy=$(this).attr('data-minbuy')
      $.ajax({
        url:'/isShopcar',
        type:"get",
        data:{pid:pid},
        success:function(res){
          if (minbuy>1 && !res.isshopcar) {
            wxc.xcConfirm("该产品的最小购买数为"+minbuy,"confirm",{onOk:function(){
              $.ajax({
                url:'/shopcar',
                type:'post',
                data:{num:1,pid:pid,minbuy:minbuy},
                success:function(res){
                  if(res==0){
                    showToast('网络繁忙,请重试');
                  }else if(res==1){
                    showToast('加入购物车成功');
                  }else if(res==2||res==962){
                    wxc.xcConfirm("您还没有登入,请先登入","confirm",{onOk:function(){
                      window.location.href="/login"
                    }})
                  }else if(res==3){
                    showToast('库存不足');
                  }
                }
              })
            }})
          } else {
            $.ajax({
              url:'/shopcar',
              type:'post',
              data:{num:1,pid:pid,minbuy:minbuy},
              success:function(res){
                if(res==0){
                  showToast('网络繁忙,请重试');
                }else if(res==1){
                  showToast('加入购物车成功');
                }else if(res==2||res==962){
                  wxc.xcConfirm("您还没有登入,请先登入","confirm",{onOk:function(){
                    window.location.href="/login"
                  }})
                }else if(res==3){
                  showToast('库存不足');
                }
              }
            })
          }
        }
      })
      return false
   })

    // var menuItem = document.getElementsByClassName('j_MenuNav')
    // var menu
    // for (var i = 0; i < menuItem.length; i++) {
    //   (function(i){
    //     menuItem[i].onmouseover = function(){

    //     }
    //   })(i)
    // }
    // canvas跨域问题，服务器上再试
    function getBgColor(imgSrc){
      var img = new Image();
      // img.src = document.querySelector(".carousel_pic div").style.backgroundImage.split(/[()"]+/)[1]
      
      img.src = imgSrc
      img.onload = function(){
        var canvas = document.createElement("canvas");
        canvas.height = img.height
        canvas.width = img.width
        var ctx = canvas.getContext("2d")
        ctx.drawImage(img,0,0,img.width,img.height)
        var imgData = ctx.getImageData(1,img.height/2,1,1)
        document.querySelector(".carousel_pic").style.backgroundColor = "rgba("+imgData.data[0]+","+imgData.data[1]+","+imgData.data[2]+","+imgData.data[3]+")"
      }
    }
    getBgColor(document.querySelector(".carousel_pic div").style.backgroundImage.split(/[()"]+/)[1])

    // 轮播
    document.querySelector(".bgImg").className="bgImg ac"
    document.querySelector(".carousel_block span").className = "ac"
    function carousel(){
      if (document.querySelector(".bgImg.ac")) {
        for (var i = 0; i < document.querySelectorAll(".bgImg").length; i++) {
          if (document.querySelectorAll(".bgImg")[i].className=="bgImg ac") {
            document.querySelectorAll(".bgImg")[i].className = "bgImg"
            document.querySelectorAll(".carousel_block span")[i].className = ""
            if (document.querySelectorAll(".bgImg").length == i+1) {
              document.querySelectorAll(".bgImg")[0].className="bgImg ac"
              document.querySelectorAll(".carousel_block span")[0].className = "ac"
            }else{
              document.querySelectorAll(".bgImg")[i+1].className = "bgImg ac"
              document.querySelectorAll(".carousel_block span")[i+1].className = "ac"
            }
            /*getBgColor(document.querySelector(".carousel_pic div.ac").style.backgroundImage.split(/[()"]+/)[1])*/
            return
          }
        }
      }else{
        document.querySelectorAll(".bgImg")[0].className="bgImg"
        document.querySelectorAll(".bgImg")[1].className="bgImg ac"
        /*getBgColor(document.querySelector(".carousel_pic div.ac").style.backgroundImage.split(/[()"]+/)[1])*/
      }
    }
    var timer = setInterval(carousel,3500)
    for (let i = 0; i < document.querySelectorAll(".carousel_block span").length; i++) {
      document.querySelectorAll(".carousel_block span")[i].onmouseover = function(res){
        document.querySelector(".bgImg.ac").className="bgImg"
        document.querySelector(".carousel_block span.ac").className = ""
        document.querySelectorAll(".bgImg")[i].className="bgImg ac"
        document.querySelectorAll(".carousel_block span")[i].className = "ac"
        clearInterval(timer)
        timer = setInterval(carousel,3500)
        /*getBgColor(document.querySelector(".carousel_pic div.ac").style.backgroundImage.split(/[()"]+/)[1])*/
      }
    }
    // 首页置顶区切换模块
    var topModuleMenu = document.querySelectorAll(".indexSale li");
    for (var i = 0; i < topModuleMenu.length; i++) {
      topModuleMenu[i].onmouseover = function(){
        document.querySelector(".indexSale ."+document.querySelector(".indexSale li.ac").attributes["data"].nodeValue).style.display = "none"
        document.querySelector(".indexSale li.ac").className = ""
        this.className = "ac"
        document.querySelector(".indexSale ."+this.attributes["data"].nodeValue).style.display = "block"
      }
    }
    $('.bgImg').click(function(){
      if($('.ac').attr('data')){
      window.location.href=$('.ac').attr('data')
      }
    })

    //品牌街
    var brandStreet = {{.brandStreet}} || []
    void function () {
      var nav=ctnstr='';
      var pagebrand = 12; 
      for (var i = 0; i < brandStreet.length; i++) {
        var v = brandStreet[i]
        var ctn = v.ctn
        var ctnLen = ctn.length
        var groupLen = Math.ceil(ctnLen / pagebrand)
        nav += '<span>'+v.name+'</span>'
        ctnstr += '<div>' +
                    '<div class="ctn-cell clearfix">'
        for (var j = 0; j < groupLen; j ++) {
          ctnstr += '<div class="brands">'
          var min = (j + 1) * pagebrand <= ctnLen ? pagebrand : ctnLen % pagebrand 
          for (var k = 0; k < min; k ++) {
            var current = ctn[j * pagebrand + k]
            ctnstr += '<a href="search_all?bid='+ current.id +'" class="img-wrap">' +
                        '<img src="' + current.pathname + '">' +
                        '<div class="cover">' +
                          '<span>' + current.name + '</span><span>点击进入</span>' +
                        '</div>' +
                      '</a>'             
          }
          ctnstr += '</div>'
        }
        ctnstr += '</div>'
        ctnstr += '<div class="footer">'
        for (var m = 0; m < groupLen; m++) {
          var mClass = m === 0 ? ' class="on" ' : ''
          ctnstr += '<span' + mClass + '></span>'
        }
        ctnstr += '</div>'
        ctnstr += '</div>'
      }
      $('#brandStreetNav').html(nav)
      $('#brandStreetNav span').eq(0).addClass('on')
      $('.brandStreetCtn').html(ctnstr)
      $('.brandStreetCtn').children().hide()
      $('.brandStreetCtn').children().eq(0).show()
    }()

    $('#brandStreetNav').on('mouseenter', 'span', function () {
      if ($(this).hasClass('on')) { return }
      var index = $(this).index()
      $(this).addClass('on').siblings().removeClass('on')
      $('.brandStreetCtn > div').hide().eq(index).show()
    })
    $('.brand-street .footer').on('mouseenter', 'span', function () {
      if ($(this).hasClass('on')) { return }
      var index = $(this).index()
      $(this).addClass('on').siblings().removeClass('on')
      var prev = $(this).parent().prev()
      var distance = -index * prev.children()[0].offsetWidth
      prev.stop().animate({ left: distance })
    })

    var noviceJoin = {{.noviceJoin}}
    $('.novice-join .banner').css('background-image', 'url(' + noviceJoin[0].pathname + ')')
    $('#noviceNav').on('mouseenter', 'div', function () {
      if ($(this).hasClass('on')) { return }
      var index = $(this).index()
      $(this).addClass('on').siblings().removeClass('on')
      $('#noviceCtn .ctn-cell').hide().eq(index).show()
      $('.novice-join .banner').css('background-image', 'url(' + noviceJoin[index].pathname + ')')
    })
    void function () {
      var index = 0
      var timer = null
      var navstr = ""
      for (var i=0; i < $('.pro-struct-wrap .ctn-cell').length; i++) {
        navstr += i === 0 ? '<span class="on"></span>' : '<span></span>'
      }
      $('.pro-struct-wrap .footer').html(navstr)
      $('.pro-struct-wrap .footer').on('mouseenter', 'span', function () {
        if ($(this).hasClass('on')) { return }
        index = $(this).index()
        $(this).addClass('on').siblings().removeClass('on')
        var prev = $(this).parent().prev()
        var distance = -index * prev.children()[1].offsetWidth
        // console.log( $('.ctn-cell')[0].offsetWidth)
        // console.log( )
        prev.stop().animate({ left: distance })
      })
      $('.pro-struct-wrap .content').hover(function () {
        clearInterval(timer)
      }, function () {
        timer = setInterval(go, 5000)
      })
      function go() {
        index = ++ index % $('.pro-struct-wrap .ctn-cell').length
        var distance = -index * $('.pro-struct-wrap .ctn-cell')[0].offsetWidth
        $('.pro-struct-wrap .ctn-wrapper').animate({ left: distance })
        $('.pro-struct-wrap .footer span').eq(index).addClass('on').siblings().removeClass('on')
      }
      timer = setInterval(go, 5000)
    }()

    void function () {
      var index = 0
      var timer = null
      $('#brandNav').on('mouseenter', 'span', function () {
        if ($(this).hasClass('on')) { return }
        index = $(this).index()
        $(this).addClass('on').siblings().removeClass('on')
        var prev = $(this).parent().prev()
        var distance = -index * prev.children()[0].offsetWidth
        prev.stop().animate({ left: distance })
      })
      $('#brandCtn').hover(function () {
        clearInterval(timer)
      }, function () {
        timer = setInterval(go, 5000)
      })
      function go() {
        index = ++ index % $('#brandNav span').length
        var distance = -index * $('#brandCtn a')[0].offsetWidth
        $('#brandCtn').animate({ left: distance })
        $('#brandNav span').eq(index).addClass('on').siblings().removeClass('on')
      }
      timer = setInterval(go, 5000)
    }()
    $('#news .items').on('mouseenter', '.item', function () {
      var pathname = $(this).attr('data-path')
      var link = $(this).attr('href')
      $('#news .banner').css('background-image', 'url(' + pathname + ')').parent().attr('href', link)
    })
    void function () {
      var bgimgs = ['/static/img/bb1.jpg', '/static/img/bb2.jpg', '/static/img/bb3.jpg', '/static/img/bb4.jpg']
      var len = bgimgs.length
      var i = 0
      $('#noviceCtn .item').each(function () {
        i %= len
        $(this).css('background-image', 'url("'+bgimgs[i++]+'")')
      })
    }()
  </script>
</html>